import sys
import platform
sys.path.append('..')
from run_suite.suite import *
import time

if __name__ == '__main__':
    leader = Engine()
    follower = Engine()
    follower1 = Engine()
    leader.start('leader.cfg', 'leader')
    time.sleep(1)
    follower.start('follower.cfg', 'follower')
    follower1.start('follower1.cfg', 'follower1')
    time.sleep(1)
    leader.stop()
    follower.stop()
    follower1.stop()
    if checkLog('follower1.log', 'Site type is not in white list 1-2-1<-X->1-3-1'):
        writeResult('follower_white_list', 'pass')
    else:
        writeResult('follower_white_list', 'fail', 'Site joined')